package com.net.all.testing;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


class Student
{
	private int id;
	private String name;
	
	Student(int id, String name)
	{
		this.id = id;
		this.name = name;
	}
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
	
}




public class DemoTest {

	 static public void main(String[] args) 
	{
	   
	   Map<Integer, Student> map = new HashMap<Integer, Student>();
	   
	   map.put(1, new Student(1, "fff"));
	   map.put(2, new Student(2, "fffggg"));
	   map.put(3, new Student(3, "fffbbb"));
	   map.put(4, new Student(4, "fffdddd"));
	   
	   System.out.println(map.get(4).getName());	 

	}

}
